{extend name="public/common"} {block name="body"}
<title>基本设置</title>
</head>
<style>
    .suglist li{
        cursor: pointer;
    }
    .suglist li:hover{
        background: #f3f3f3;
    }
    .ul_tab {
        height: 40px;
        background-color: #e5e5e5;
        border-bottom: 1px solid #e4e7ed;
    }

    .ul_tab li {
        position: relative;
        float: left;
        width: 112px;
        height: 40px;
        line-height: 40px;
        text-align: center;
        cursor: pointer;
    }

    .ul_tab span {
        position: absolute;
        right: 0;
        top: 10px;
        background: #ddd;
        width: 1px;
        height: 14px;
        overflow: hidden;
    }
    .products {
        width: 98%;
        height: 100%;
        padding: 20px;
        margin-top: -9px;
    }

    .products .main {
        float: left;
        display: none;
        width: 100%;
    }

    .products .main.selected {
        display: block;
    }
    .ul_tab li.active {
        border-bottom: 1px solid #fff;
        background-color: #636363;
        border-right: 1px solid #ddd;
        border-left: 1px solid #ddd;
        color: white !important;
    }
    .active a {
        color: white;
    }
    .btn-success {
        color: #fff;
        background-color: #636363;
        border-color: #636363;
    }
    .btn-success:hover, .btn-success:focus, .btn-success:active, .btn-success.active {
        color: #636363;
        background-color: #e5e5e5;
        border-color: #e5e5e5;
    }
    .table-bg thead th {
        background-color: #ffffff;
    }
    table tbody tr:hover{
        background-color: #f5f7fa !important;
    }
    .text{
        height: 44px;
    }
    .text th{
        color: #909399;
        font-size: 14px;
    }
    .text-c td{
        font-size: 14px;
    }
    .tab-item a{
        display: inline-block;
        width: 100%;
        height: 100%;
    }
    a:hover{

        text-decoration: none;
    }
    .tab-item a{
        color: #333;
    }

    .table-hover tbody tr:hover td,.table-hover tbody tr:hover th{background-color:#e5e5e5}
    .text th {
        color: #909399;
        font-size: 14px;

    }
    .navbar {
        background: #3f3f3f;
    }
    /*.text-c td {
        color: #909399;
    }
    .text-c td a {
        color: #909399;
    }*/

    .dataTables_wrapper .dataTables_paginate .paginate_button:hover, .dataTables_wrapper .dataTables_paginate .paginate_button.current, .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
        background: #e5e5e5;
        color: #636363;
    }
</style>
<body>
<nav class="breadcrumb">
    <i class="Hui-iconfont">&#xe67f;</i>

    彩种管理
    <span class="c-gray en">&gt;</span>
    彩种列表
    <a class="btn btn-success radius r"
       style="line-height: 1.6em; margin-top: 3px"
       href="javascript:location.replace(location.href);" title="刷新">
        <i class="Hui-iconfont">&#xe68f;</i>
    </a>
</nav>
<div style="padding:20px;height:30px;">
    <div style="width: 100%;height: 50px;">
        <ul class="ul_tab">
            <li class="tab-item active"><a style="color: white;" href="{:url('lottery/cz_plsz')}">基础赔率</a></li>
            <li class="tab-item"><a href="{:url('lottery/pl_list')}">彩种赔率</a></li>
        </ul>
    </div>
    <div class="new_box">
        <div class="text-c" style="padding :20px 0;">
            <div  style="width:217px;" class="formControls col-xs-8 col-sm-9">
    	<span class="select-box">
			<select class="select" name="id" id="code">
                {volist name="caizhong" id="vo"}
                <option value="{$vo.id}" {if condition="input('get.id') == $vo.id"}selected{/if}>{$vo.class_name_lottery}</option>
                {/volist}
            </select>
		</span>
            </div>
        </div>
        <form class="am-form am-g" method="post">
            <div class="page-container" style="padding-top:0;">
                <div id="tab-system" class="HuiTab">
                    <div class="tabCon">
                        <div class="mt-20">
                            <table
                                    class="table table-border table-bordered table-bg table-hover table-sort table-responsive">
                                <thead>
                                <tr class="text-c">
                                    <th>ID</th>
                                    <th>赔率名称</th>
                                    <th>最高赔率</th>
                                    <th>最低赔率</th>

                                </tr>

                                </thead>
                                <tbody>
                                {volist name="list" id="PL"}


                                <tr class="text-c">
                                    <td>{$PL.id}</td>
                                    <td>{$PL.peilv_name}</td>
                                    <td>
                                        <input name='zgpl_{$PL.id}' value='{$PL.zgpl}' style='font-size:12px; text-align:center; width:100px' onchange="updatePlInfo(this.value,this.name)" onkeypress="if(event.keyCode == 13){ blur()}"/>
                                    </td>
                                    <td>
                                        <input name='zdpl_{$PL.id}' value='{$PL.zdpl}' style='font-size:12px; text-align:center; width:100px' onchange="updatePlInfo(this.value,this.name)" onkeypress="if(event.keyCode == 13){ blur()}"/>
                                    </td>
                                </tr>
                                {/volist}
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
    </div>
</div>
<div class="am-margin" style="margin-top:60px;">

</div>
</form>
{/block}{block name="js"}
<script type="text/javascript">
    $("#code").on('change',function(){
        var id = $(this).find('option:selected').val();
        window.location.href="/admin/lottery/cz_plsz?id="+id;
    })
    $(function() {
        $('.skin-minimal input').iCheck({
            checkboxClass : 'icheckbox-blue',
            radioClass : 'iradio-blue',
            increaseArea : '20%'
        });
        $("#tab-system").Huitab({
            index : 0
        });
    });
</script>
<script type="text/javascript">
    function updatePlInfo(value,name) {
        $.ajax({
            type : "post",
            url : "{:url('lottery/updatePlInfo')}",
            data : {"name":name,"value":value},
            success: function (data) {
                if(data==1) {
                    alert("更新成功");
                } else {
                    alert("更新失败请重试！");
                }
            }
        });
    }
</script>

{/block}